package com.sanjin.configuration.security;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @description:
 * @author: sanjin
 * @date: 2019/5/6 12:28
 */
public class PlaintextPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence rawPassword) {
        return rawPassword.toString();
    }

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return rawPassword.equals(encodedPassword);
    }
}
